function updateNews(newsData) {
  var newsBlock = document.querySelector('.news-block');
  var newsImage = newsBlock.querySelector('.news-image');
  var newsTitle = newsBlock.querySelector('h2');
  var newsContent = newsBlock.querySelector('p');
  var newsDate = newsBlock.querySelector('.date');

  newsImage.src = newsData.imageSrc;
  newsTitle.textContent = newsData.title;
  newsContent.textContent = newsData.content;
  newsDate.textContent = newsData.date;
}
// 每隔一段时间调用updateNews函数更新新闻
setInterval(function() {
  fetchNewsFromServer(function(newsData) {
    updateNews(newsData);
  });
}, 60000); // 每分钟更新一次